package com.yznote.cloudesk.backstage.controller;

import com.yznote.cloudesk.cache.yCache.YCache;
import com.yznote.cloudesk.common.pojo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@Api(tags = "缓存管理")
@RestController
public class YcacheController {
    @Autowired
    YCache yCache;

    @ApiOperation("获得所有缓存块名字")
    @GetMapping("/getAllCacheName")
    public Result getAllCacheName(){
        List<String> allCacheName = yCache.getAllCacheName();
        return Result.success(allCacheName);
    }
}
